package com.tangding.log.impl;

import org.springframework.stereotype.Component;

import com.tangding.common.utils.JacksonUtil;
import com.tangding.log.LogMatcher;

/**
 * @description 
 *
 * @author Ranger
 * @version 2017年12月20日_下午2:01:59
 *
 */
@Component
public class ControlPlayerLog extends LogMatcher {

	@Override
	public String cmdDisplay(String cmd, Object... args) {
		Object[] as = (Object[])(args[0]);
		int level = Integer.parseInt(JacksonUtil.get(as[0], "level", true));
		String control = "控平";
		if (level < 0) {
			control = "杀" + Math.abs(level);
		}else if (level > 0) {
			control = "放" + Math.abs(level);
		}
		
		String info = JacksonUtil.get(as[0], "info", true);
		
		return "对【" + info + "】进行（" + control + "）操作";
	}

}
